-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix going back from wallet page returns to the same page after adding a bank account #39351
Fix going back from wallet page returns to the same page after adding a bank account #39351
Conversation
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
I keep getting error when adding the bank account, so I manually changed the code to immediately show the success screen. |
Reviewer Checklist
Screenshots/VideosAndroid: Native24-04-04-01-02-55.mp4Android: mWeb ChromeScreen.Recording.2024-04-04.at.00.58.33.moviOS: NativeScreen.Recording.2024-04-04.at.00.53.31.moviOS: mWeb SafariScreen.Recording.2024-04-04.at.00.55.41.movMacOS: Chrome / SafariScreen.Recording.2024-04-04.at.00.47.55.movMacOS: DesktopScreen.Recording.2024-04-04.at.00.50.09.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and tests well!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Failing in Web with the fixed issue 38558. User has to click |
Hmm, if I check the nav stack, there is only one wallet page. From my investigation, that happens because the nav stack item is mismatched with the browser's native navigation history. When I open The rn nav stack will be: When I open the add personal bank account page, the browser history length becomes 4, and the rn nav stack will include the add personal bank account page. Now here comes the problem. When the plaid flow shows, the browser history length is increased too, so it's now 5. browser history length: 5 When we go back from the add personal bank account page, rn nav will pop it out from the stack, but technically, we are still at the 4th item of the browser history. browser history length: 5, we are at 4th Pressing back from the browser back button will bring us to the 3rd item of the browser history and remember, the 3rd item is the wallet page. That's why we see the wallet page again. Press back again will bring us to the 2nd item which is the settings profile page. I think we should handle it on a separate issue if we want to fix it. |
I see the issue with having to press the Screen.Recording.2024-04-05.at.3.28.32.PM.movI would think this issue would also exist on mobile platforms as well. @kavimuru I recommend creating a separate issue because in this PR, we've only updated the logic related to the in-app back button - we haven't altered the logic related to the browser back button. |
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.60-13 🚀
|
Details
The code to go back calls a go-back navigation with a fallback route to the wallet page. The personal bank account page is the only RHP in the stack, so it uses the fallback route and added it to the stack, so we have 2 wallet page in nav stack.
Fixed Issues
$ #38558
PROPOSAL: #38558 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-04-01.at.20.16.29.mov
Android: mWeb Chrome
Screen.Recording.2024-04-01.at.20.18.24.mov
iOS: Native
Screen.Recording.2024-04-01.at.20.17.31.mov
iOS: mWeb Safari
Screen.Recording.2024-04-01.at.20.16.04.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-01.at.20.09.50.mov
MacOS: Desktop
Screen.Recording.2024-04-01.at.20.14.34.mov